//
//  BaiChuanShare.h
//  danpin
//
//  Created by chuangjia on 21/7/15.
//  Copyright (c) 2015 chuangjia. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <TAESDK/TAESDK.h>
#import <ALBBLoginSDK/ALBBLoginService.h>
//
#import <ALBBTradeSDK/ALBBItemService.h>  //商品详情API
#import <ALBBTradeSDK/ALBBCartService.h>
#import <ALBBTradeSDK/ALBBOrderService.h>

#define APP_KEY @"23183393"
#define APP_SECRET @"08df46d462b479c6eff371098e70ef50"
#define PID @"mm_44436728_0_0"
#import "ZGlobal.h"

@interface BaiChuanShare : NSObject
+ (instancetype)sharedInstance;
-(void)initSDK:(BOOL)isDebug;
-(BOOL)handleOpenURL:(NSURL *)url;
//插件版登录状态监听
-(void)setSessionStateChangedHandler;
-(void)loginTaoBao:(id)sender success:(void(^)(id result))success failure:(void(^)(NSError* error))failure;
-(void)logout;
/*商品详情页，
 *itemId 使用商品id
 *itemType 商品类型:1代表淘宝，2代表天猫
 */
-(void)showTaoKeItemDetail:(id)sender ItemId:(NSString*)itemId itemType:(NSString*)itemType;
/**
 *  使用TaeSDK的webview打开H5页面，可以自动实现淘宝安全免登
 *
 *  @param parentController  app当前的Controller
 *  @param isNeedPush            是否需要使用parentController进行push
 *  @param pageUrl                  页面的url
 *  @param webViewUISettings        可以自定义的webview配置项
 */
-(void) showPage:(UIViewController *) parentController isNeedPush:(BOOL) isNeedPush openUrl:(NSString *)openUrl;
@end
